package com.zh.mediaservice.controller.User;

import com.zh.mediacommon.result.Result;
import com.zh.mediapojo.vo.ReserveVO;
import com.zh.mediaservice.service.ReserveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("UserReserveController")
@RequestMapping("/user")
public class ReserveController {
        @Autowired
        private ReserveService reserveService;

        @GetMapping("/checkCanReserve/{doctorId}/{reserveTime}")
        public Result<ReserveVO> checkIsCanReserve(@PathVariable Integer doctorId,@PathVariable String reserveTime){
            ReserveVO reserveVO = reserveService.checkIsCanReserve(doctorId,reserveTime);
            return Result.success(reserveVO);
        }
}
